<extend name="../layout" />

<block name="main_content">
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title"> <span class="icon"><i class="icon-search"></i></span>
                    <h5>{:L('filter')}</h5>
                </div>
                <div class="widget-content nopadding">
                    <form style="padding:5px 5px 0" method="GET">
                        <div class="controls controls-row">
                            <select name="filter_field" class="span1">
                                <option value="factory_code_all">{:L('factory_code_all')}</option>
                            </select>
                            <input type="text" name="filter_value" class="span1 m-wrap">
                            <button class="btn m-wrap span1" type="submit">{:L('search')}</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="row-fluid">
        <div class="span2">
            <div class="widget-box">
                <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
                    <h5>{:L('stock_list')}</h5>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered table-striped with-check">
                        <tbody>
                            <volist name="stocks" id="sk">
                                <tr>
                                    <th>{$sk.id}</th>
                                    <td><a href="{:U('/JXC/StockProductList/index/stock_id/'.$sk[id])}">{$sk.name}</a></td>
                                </tr>
                            </volist>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="span10">
            <div class="widget-box">
                <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
                    <h5>{$theStock.name}-{:L('stock_product_list')}</h5>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered table-striped with-check">
                      <thead>
                        <tr>
                            <th>{:L('id')}</th>
                            <th>{:L('factory_code_all')}</th>
                            <th>{:L('goods')}</th>
                            <th>{:L('color')}</th>
                            <th>{:L('standard')}</th>
                            <th>{:L('num')}</th>
                            <th>{:L('store_min')}</th>
                        </tr>
                      </thead>
                      <tbody id="stockin_table">
                          <volist name="list" id="t">
                              <tr rowid="{$t.id}">
                                  <td>{$t.id}</td>
                                  <td>{$t.factory_code_all}</td>
                                  <td>{$t.goods_name}</td>
                                  <td>{$t.color_name}</td>
                                  <td>{$t.standard_name}</td>
                                  <td class="the_num">
                                        <if condition="$t[num] lt $t[store_min]">
                                            <span class="label label-important">{$t.num}</span>
                                        <elseif condition="$t[num] eq $t[store_min]" />
                                            <span class="label label-warning">{$t.num}</span>
                                        <else />
                                            <span class="label label-info">{$t.num}</span>
                                        </if>
                                  </td>
                                  <td>{$t.store_min}</td>
                              </tr>
                          </volist>
                      </tbody>
                      <tfoot>
                          <tr>
                              <td colspan="4">
                                  <div class="pagination alternate"><ul>{$page}</ul></div>
                              </td>
                              <th>
                                  <a href="javascript:history.go(-1);" class="btn btn-info">{:L('go_back')}</a>
                              </th>
                              <td colspan="2">
                                  {:L('total_num')}
                                  <span class="label label-success" id="total_num">{$totalNum}</span>
                              </td>
                          </tr>
                      </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
</block>
